<div>
  <form class="form-horizontal" role="form" name="myForm" novalidate ng-init="initQuery()">
    <div class="form-ctrl md-whiteframe-z1">
      <div class="form-search" style="height:270px;" ng-class="{'shou':!userLossDIAnalysis.showSearchPanel}"
           ng-switch
           on="userLossDIAnalysis.timeType">
        <div>
          <md-input-container flex>
            <label>开始时间</label>
            <input type="date" ng-model="userLossDIAnalysis.params.startTime"  time-validate="day"
                   end-time="userLossDIAnalysis.params.endTime"
                   required name="startTime">

            <div ng-messages="myForm.startTime.$error">
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
        <div>
          <md-input-container flex>
            <label>结束时间</label>
            <input type="date" ng-model="userLossDIAnalysis.params.endTime"  time-validate="day"
                   start-time="userLossDIAnalysis.params.startTime"
                   required name="endTime">

            <div ng-messages="myForm.endTime.$error">
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="time-error">开始时间不应大于结束时间</div>
              <div ng-message="too-great">结束时间不应大于当前时间</div>
            </div>
          </md-input-container>
        </div>
        <div>
          <label style="width:70px">业务线</label>
          <md-select ng-model="userLossDIAnalysis.params.businessCodes">
            <md-option ng-value="0">全部</md-option>
            <md-option ng-value="bl.businessLineCode" ng-repeat="bl in userLossDIAnalysis.businessLineList">
              {{bl.businessLineName}}
            </md-option>
          </md-select>
        </div>
        <div>
          <label style="width:70px">省公司</label>
          <md-select ng-model="userLossDIAnalysis.params.provinceCodes">
            <md-option ng-value="0">全部</md-option>
            <md-option ng-value="pc.provinceCode" ng-repeat="pc in userLossDIAnalysis.provincialCompanyList">{{pc.provinceName}}
            </md-option>
          </md-select>
        </div>
      </div>
      <i class="glyphicon glyphicon-chevron-up shrinkage" ng-show="userLossDIAnalysis.showSearchPanel"
         ng-click="userLossDIAnalysis.hideSearchPanel()" ng-hide="myForm.$invalid || userLossDIAnalysis.arrow"></i>
      <md-button ng-disabled="myForm.$invalid" ng-click="userLossDIAnalysis.search()"
                 class="md-fab md-primary md-hue-1"
                 aria-label="Profile">
        <i class="glyphicon glyphicon-arrow-down" style="margin-top:28px;"
           ng-show="!userLossDIAnalysis.showSearchPanel"></i>
        <i class="glyphicon glyphicon-search" ng-show="userLossDIAnalysis.showSearchPanel"></i>
      </md-button>
    </div>
  </form>
  <div class="table-info">
    <div>
      <div class="menus" ng-show="userLossDIAnalysis.showIcon">
        <form action="{{exportUrl}}" target="_black" method="post"
              style="display: initial;" ng-submit="userLossDIAnalysis.onSubmit()">
          <input type="hidden" name="data" value="{{userLossDIAnalysis.sendData}}">
          <md-button type="submit" class="md-raised">导出Excel</md-button>
        </form>
      </div>
      <div ng-show="userLossDIAnalysis.showDataByHourBtn">
        <md-button ng-click="userLossDIAnalysis.back()" class="md-raised" id="backBtn">返回</md-button>
      </div>
      <div ng-show="userLossDIAnalysis.viewType === 'chart'" style="padding: 0 16px;">
        <div id="userLossDIAnalysisChart" style="height:450px; width: 100%;"></div>
      </div>
      <div ng-show="userLossDIAnalysis.viewType === 'table'">
        <div class="table-detail">
          <div class="t_r">
            <table class="table table-bordered">
              <caption style="text-align:center;font-size:large;font-weight:bold;color:black">
                {{userLossDIAnalysis.title}}
              </caption>
              <tr>
                <th>业务线</th>
                <th>省公司</th>
                <th>手机号</th>
                <th>充值频率（月/次）</th>
                <th>平均充值金额（元）</th>
                <th>最后一次充值时间</th>
                <th>最后一次充值金额（元）</th>
              </tr>
              </thead>
              <tbody>
              <tr ng-repeat="data in userLossDIAnalysis.userLoseDIList">
                <td class="diffcount-td" ng-repeat="d in data track by $index">
                  <div style="width:100%;" ng-if="d.$index===3">{{d}}月/次</div>
                  <div style="width:100%;" ng-if="d.$index!==3">{{d}}</div>
                </td>
              </tr>
              </tbody>
            </table>
          </div>
        </div>
        <ds-page
            total-count="userLossDIAnalysis.send.page.totalCount"
            page-size="userLossDIAnalysis.send.page.pageSize"
            page-itmes="userLossDIAnalysis.pageItems"
            param="userLossDIAnalysis.send"
            current-page="userLossDIAnalysis.send.page.currentPage"
            go-page="userLossDIAnalysis.search(true)"
            show-max-page="5"
            first-text="<<"
            last-text=">
             >"
            previous-text="
             <"
            next-text=">
               "
            >
        </ds-page>
      </div>
    </div>
  </div>
</div>